package Pantallas;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ContainerAdapter;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.SwingUtilities;

import Clases.Seccion;
import java.awt.BorderLayout;
import java.awt.Frame;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class jMenu extends javax.swing.JFrame {
	private JMenuBar AsigEstudiante;
	private JMenu jMenu1;
	private Seccion sec = new Seccion();
	private JMenuItem jMenuItem6;
	private JMenuItem jMenuItem7;
	private JMenuItem jMenuItem8;
	private JMenuItem jMenuItem9;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JLabel jLabel5;
	private JLabel jLabel7;
	private JLabel jLabel6;
	private JLabel jLabel2;
	private JLabel jLabel1;
	private JMenuItem jMenuItem1;
	private JMenu jMenu4;
	private JMenuItem jMenuItem10;
	private JMenuItem jMenuItem5;
	private JMenu jMenu3;
	private JMenuItem jMenuItem4;
	private JMenuItem jMenuItem3;
	private JMenu jMenu2;
	private JMenuItem jMenuItem2;


	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				jMenu inst = new jMenu();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public jMenu() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jLabel1 = new JLabel();
				getContentPane().add(jLabel1);
				jLabel1.setBounds(22, 49, 525, 341);
				jLabel1.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/Dibujo.JPG")));
			}
			{
				jLabel2 = new JLabel();
				getContentPane().add(jLabel2);
				jLabel2.setText("Integrantes:");
				jLabel2.setBounds(238, 402, 83, 18);
				jLabel2.setFont(new java.awt.Font("Segoe UI",1,14));
			}
			{
				jLabel3 = new JLabel();
				getContentPane().add(jLabel3);
				jLabel3.setText("Alfa Pernalete");
				jLabel3.setBounds(239, 430, 92, 15);
			}
			{
				jLabel4 = new JLabel();
				getContentPane().add(jLabel4);
				jLabel4.setText("Maryelis Mendez");
				jLabel4.setBounds(231, 449, 105, 15);
			}
			{
				jLabel5 = new JLabel();
				getContentPane().add(jLabel5);
				jLabel5.setText("Mayilde Rivero");
				jLabel5.setBounds(237, 469, 97, 15);
			}
			{
				jLabel6 = new JLabel();
				getContentPane().add(jLabel6);
				jLabel6.setText("Robert Alvarado");
				jLabel6.setBounds(234, 490, 100, 15);
			}
			{
				jLabel7 = new JLabel();
				getContentPane().add(jLabel7);
				jLabel7.setText("LABORATORIO I");
				jLabel7.setBounds(398, 22, 149, 15);
				jLabel7.setFont(new java.awt.Font("Segoe UI",1,18));
			}

			{
				AsigEstudiante = new JMenuBar();
				setJMenuBar(AsigEstudiante);
				{
					jMenu4 = new JMenu();
					AsigEstudiante.add(jMenu4);
					jMenu4.setText("Profesor");
					{
						jMenuItem1 = new JMenuItem();
						jMenu4.add(jMenuItem1);
						jMenuItem1.setText("Asignar Profesor");
						jMenuItem1.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem1.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem1.actionPerformed
								AsigProf form =new AsigProf(null,sec);
								form.setModal(true);
								form.show();
								sec= form.getSeccion();
								jMenu4.setEnabled(false);
								jMenuItem10.setEnabled(false);
								jMenuItem9.setEnabled(false);
								jMenuItem8.setEnabled(false);
								jMenuItem6.setEnabled(false);
							
								jMenu1.setEnabled(true);
								
								
								
							}
						});
					}
				}
				{
					jMenu1 = new JMenu();
					AsigEstudiante.add(jMenu1);
					jMenu1.setText("Estudiante");
					jMenu1.setEnabled(false);
					{
						jMenuItem2 = new JMenuItem();
						jMenu1.add(jMenuItem2);
						jMenuItem2.setText("Inscribir Estudiante");
						jMenuItem2.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem2.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem2.actionPerformed
								aEstu form =new aEstu(null,sec);
								form.setModal(true);
								form.show();
								sec= form.getSeccion();
								jMenu3.setEnabled(true);
								jMenu2.setEnabled(true);
								
							}
						});
					}
					{
						jMenuItem7 = new JMenuItem();
						jMenu1.add(jMenuItem7);
						jMenuItem7.setText("Buscar Estudiante");
						jMenuItem7.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem7.actionPerformed, event="+evt);
								BusEstudiante form = new BusEstudiante (null,sec);
								form.setModal(true);
								form.show();
								//TODO add your code for jMenuItem7.actionPerformed
							}
						});
					}
					{
						jMenuItem4 = new JMenuItem();
						jMenu1.add(jMenuItem4);
						jMenuItem4.setText("Retirar Estudiante");
						jMenuItem4.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								jMenuItem4ActionPerformed(evt);
							}
						});
					}
				}
				{

				}
				{
					jMenu3 = new JMenu();
					AsigEstudiante.add(jMenu3);
					jMenu3.setText("Seccion");
					jMenu3.setEnabled(false);
					{
						jMenuItem5 = new JMenuItem();
						jMenu3.add(jMenuItem5);
						jMenuItem5.setText("Aplicar Evaluacion");
						jMenuItem5.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem5.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem5.actionPerformed
								sec.AplicarEvaluacion();
								JOptionPane.showMessageDialog(null, "Evaluacion Completada");
								jMenuItem2.setEnabled(false);
								jMenuItem5.setEnabled(false);
								jMenuItem10.setEnabled(true);
								jMenuItem9.setEnabled(true);
								jMenuItem8.setEnabled(true);
								jMenuItem6.setEnabled(true);

							}
						});
					}
					{
						jMenuItem10 = new JMenuItem();
						jMenu3.add(jMenuItem10);
						jMenuItem10.setText("Promedio de Notas");
						jMenuItem10.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem10.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem10.actionPerformed
								Promedio form = new Promedio (null,sec);
								form.setModal(true);
								form.show();
							}
						});
					}
				}
				{
					jMenu2 = new JMenu();
					AsigEstudiante.add(jMenu2);
					jMenu2.setText("Reportes");
					jMenu2.setEnabled(false);
					{
						jMenuItem3 = new JMenuItem();
						jMenu2.add(jMenuItem3);
						jMenuItem3.setText("Estudiantes por Cedula");
						jMenuItem3.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem3.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem3.actionPerformed
								porCedula form =new porCedula(null,sec);
								form.setModal(true);
								form.show();
								
							}
						});
					}
					{
						jMenuItem9 = new JMenuItem();
						jMenu2.add(jMenuItem9);
						jMenuItem9.setText("Estudiantes por Nota");
						jMenuItem9.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem9.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem9.actionPerformed
								porNota form =new porNota(null,sec);
								form.setModal(true);
								form.show();
							}
						});
					}
					{
						jMenuItem8 = new JMenuItem();
						jMenu2.add(jMenuItem8);
						jMenuItem8.setText("Estudiantes Aprobados");
						jMenuItem8.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem8.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem8.actionPerformed
								Aprobados form =new Aprobados (null,sec);
								form.setModal(true);
								form.show();
							}
						});
					}
					{
						jMenuItem6 = new JMenuItem();
						jMenu2.add(jMenuItem6);
						jMenuItem6.setText("Estudiantes Aplazados");
						jMenuItem6.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItem6.actionPerformed, event="+evt);
								//TODO add your code for jMenuItem6.actionPerformed
								aplazados form =new aplazados (null,sec);
								form.setModal(true);
								form.show();
								
							}
						});
					}
				}
			}
			pack();
			this.setSize(577, 611);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	private void jMenuItem4ActionPerformed(ActionEvent evt) {
		System.out.println("jMenuItem4.actionPerformed, event="+evt);
		//TODO add your code for jMenuItem4.actionPerformed
		RetiEstudiante form =new RetiEstudiante(null,sec);
		form.setModal(true);
		form.show();
		sec= form.getSeccion();

	}

}
